package com.bj58.ecdata.redis.util;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.Collections;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: xuehuayang
 * Date: 12-5-22
 * To change this template use File | Settings | File Templates.
 */
public class Test {

    public static void main(String... avgs){
        List<List> o = Collections.EMPTY_LIST;
        SpyMemcachedSerializeUtil.encode(o);
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            ObjectOutputStream os = new ObjectOutputStream(bos);
            os.writeObject(o);
            os.close();
            bos.close();
            System.out.println(bos.toByteArray().length);
        } catch (IOException e) {
            throw new IllegalArgumentException("Non-serializable object", e);
        }
    }
}
